<template>
  <div id="app">
  	
  	<mt-header fixed :title="headerTitle" style="z-index: 99;font-size: 17px;" >
  		<mt-button icon="back" slot="left" @click="$router.go(-1)"></mt-button>
  	</mt-header>
  	
    <!--<div id="nav">
    	<!--跳转 路由的a标签- ->
    	<div v-for="(link,index) in linkList" :key="link.name">
      <router-link  :to="link.path">{{link.name}}</router-link>
      <span v-if="index !=linkList.length-1">|</span>
    	</div>
    	
      <!-- <router-link to="/">Home</router-link> |
      <router-link to="/about">About</router-link>|
      <router-link to="/mine">Mine</router-link> - ->
      
    </div>-->
    
    <!--路由渲染视窗			-->	
    <router-view/>
  </div>
</template>
<script type="text/javascript">
	export default{
		data(){
			return{
				linkList:[
				{name:'Home',path:'/home'},
				{name:'About',path:'/about'},
				{name:'Mine',path:'/mine'},
				]
			}
		},
		computed:{
			headerTitle(){	//数据依赖更新时，计算属性重新触发更新
				return this.$store.state.headerTitle
			}
		}
	}
</script>


<style lang="scss">
	
	
	
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  padding-top: 40px;
}
#nav {
	div{display: inline-block;}
  padding: 30px;
  a {
    font-weight: bold;
    color: #2c3e50;
    &.router-link-active,&.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
